package com.myway.dto.pricing;

import java.io.Serializable;
import java.math.BigDecimal;


public class DTOIntlFare  implements Serializable {

	private DTOPriceUnit farePrice = new DTOPriceUnit();
	private DTOPriceUnit marketFare = new DTOPriceUnit();
//	private List<DTOTaxPrice> taxs = new ArrayList<DTOTaxPrice>();
	/**
	 * 运价基础
	 */
	private String fareBase;
	private String remark;
	
	private String policyNo;
	
//	private DTOCommissionIntl commission = new DTOCommissionIntl();
	
	public DTOIntlFare(){
		
	}
	
	public DTOPriceUnit getFarePrice() {
		return farePrice;
	}
	public void setFarePrice(DTOPriceUnit farePrice) {
		this.farePrice = farePrice;
	}
	public DTOPriceUnit getMarketFare() {
		return marketFare;
	}
	public void setMarketFare(DTOPriceUnit marketFare) {
		this.marketFare = marketFare;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	public String getFareBase() {
		return fareBase;
	}

	public void setFareBase(String fareBase) {
		this.fareBase = fareBase;
	}


	public String getPolicyNo() {
		return policyNo;
	}

	public void setPolicyNo(String policyNo) {
		this.policyNo = policyNo;
	}
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("Fare: ").append(farePrice.getPrice()).append("\n").append("Policy: " + policyNo).append("\n")
//		.append("Commission: ").append(commission.toString())
		;

		return sb.toString();
	}
	
	public double getTotal(){
		return farePrice.getPrice()+getTotalTaxs();
	}
	
	public double getTotalTaxs(){
		BigDecimal totalTaxs = new BigDecimal(0);
//		for(DTOTaxPrice tax : taxs){
//			totalTaxs = totalTaxs.add(tax.getPrice());
//		}
		return totalTaxs.doubleValue();
	}
	
}
